<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>登录 - 在线课程系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/antd@5.13.1/dist/reset.min.css">
    <style>
        body { display: flex; justify-content: center; align-items: center; height: 100vh; background: #f5f5f5; }
        .login-box { background: #fff; padding: 32px 40px; border-radius: 8px; box-shadow: 0 2px 8px #eee; }
        .login-box h2 { margin-bottom: 24px; }
        .login-box input { width: 100%; margin-bottom: 16px; padding: 8px; }
        .login-box button { width: 100%; padding: 8px; background: #1677ff; color: #fff; border: none; border-radius: 4px; }
        .login-box .link { display: block; margin-top: 12px; text-align: right; }
    </style>
</head>
<body>
<div class="login-box">
    <h2>用户登录</h2>
    <div th:if="${param.error}" style="color:red;margin-bottom:10px;">用户名或密码错误</div>
    <form method="post" action="/login">
        <input type="text" name="username" placeholder="用户名" required />
        <input type="password" name="password" placeholder="密码" required />
        <button type="submit">登录</button>
    </form>
    <a class="link" href="/register">没有账号？去注册</a>
</div>
</body>
</html> 